package com.example.demo.scheduled;

import com.example.demo.alarm.service.impl.AlarmListUtil;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 *
 */
public class MyTask extends ScheduleTask {

    public MyTask(Integer id) {
        super(id);
    }

    @Override
    public void run() {
        //todo Your operation

        //System.out.println(new SimpleDateFormat("yyyy-MM-dd hh:mm:ss").format(new Date()) + "任务" + this.getId() + "开始执行");
        //调用实体类方法
        AlarmListUtil alarm = new AlarmListUtil();
        alarm.getAlarm(this.getId());
    }

}
